Avoid an MWException "X is not a valid file title." with invalid
input such as index.php?title=Special:Undelete&title=X&file=Y .
Change-Id: Ie915726fdde8e772a63713d3eb9da232d9fd83bd
if ( $this->mTimestamp !== '' ) {
$this->showRevision( $this->mTimestamp );
- } elseif ( $this->mFilename !== null ) {
+ } elseif ( $this->mFilename !== null && $this->mTargetObj->inNamespace( NS_FILE ) ) {
$file = new ArchivedFile( $this->mTargetObj, '', $this->mFilename );
// Check if user is allowed to see this file
if ( !$file->exists() ) {